return {
    {
        "hrsh7th/nvim-cmp",
        dependencies = {
            "hrsh7th/cmp-buffer",             -- 单词补全
            "hrsh7th/cmp-path",               -- 路径补全
            "hrsh7th/cmp-nvim-lsp",           -- 语义分析补全
            -- "quangnguyen30192/cmp-nvim-tags", -- 符号补全  (不生效欸)
            "hrsh7th/cmp-cmdline",
            "hrsh7th/cmp-vsnip",
            "hrsh7th/vim-vsnip",
            "rafamadriz/friendly-snippets",
            "onsails/lspkind-nvim",
        },
        config = function()
            local lspkind = require("lspkind")
            local cmp = require("cmp")
            -- local tags = require("cmp_nvim_tags")

            cmp.setup({
                snippet = {
                    expand = function(args)
                        --require("luasnip").lsp_expand(args.body)
                        vim.fn["vsnip#anonymous"](args.body)
                    end,
                },
                mapping = cmp.mapping.preset.insert({  -- 补全快捷键
                    ['<Tab>'] = cmp.mapping.select_next_item(),
                    ['<S-Tab>'] = cmp.mapping.select_prev_item(),
                    ['<C-b>'] = cmp.mapping.scroll_docs(-4),
                    ['<C-f>'] = cmp.mapping.scroll_docs(4),
                    ['<C-Space>'] = cmp.mapping.complete(),
                    ['<C-e>'] = cmp.mapping.abort(),
                    ['<CR>'] = cmp.mapping.confirm({ select = true }),
                }),
                formatting = {
                    format = lspkind.cmp_format({
                        with_text = true, -- do not show text alongside icons
                        maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
                        before = function (entry, vim_item)
                            -- Source 显示提示来源
                            vim_item.menu = "["..string.upper(entry.source.name).."]"
                            return vim_item
                        end
                    })
                },
                sources = cmp.config.sources({
                    { name = 'nvim_lsp' },
                    { name = 'vsnip' },
                    { name = 'tags' },
                    { name = 'buffer' },
                    { name = "path" },
                }),
            })
        end,
    },
}
